package Chapter02.HomeWork;

import java.util.Scanner;

public class Test06 {
    public static void main(String[] args) {
        int[] num=new int[3];
        int max=0;
        int min=0;
        System.out.println("输入三个数:");
        Scanner input=new Scanner(System.in);
        max=num[0];
        min=num[0];
        for(int i=0;i<3;i++){
            num[i]=input.nextInt();
            if(num[i]>max){
                max=num[i];
            }
            if(num[i]<min){
                min=num[i];
            }
        }
        System.out.println("最大数"+max+"最小数"+min);
    }
}
